Domain-specific language for dataset transformations

ABSTRACT

Techniques related to a domain-specific language for transformations are disclosed. A server computer may process a table definition composed in a domain-specific language. The table definition may include a sequence of one or more transformations to be performed on one or more source tables to generate a target table. The sequence may include a customized transformation. A source dataset may be provided as input to an implementation of the customized transformation. An output dataset may be generated as a result of executing the implementation. An intermediate table may be generated based on performing at least one transformation on a particular source table. A supplemental portion for the intermediate table may be generated based on performing the at least one transformation on an appended portion of the particular source table. The target table may be generated based on combining the supplemental portion with the intermediate table.

BENEFIT CLAIM

This application claims the benefit under 35 U.S.C. § 120 as acontinuation of application Ser. No. 15/369,753, filed Dec. 5, 2016,which claims the benefit under 35 U.S.C. § 120 as a continuation ofapplication Ser. No. 14/874,690, filed Oct. 5, 2015, which claims thebenefit under 35 U.S.C. § 119(e) of provisional application 62/216,192,filed Sep. 9, 2015, the entire contents of which is hereby incorporatedby reference as if fully set forth herein.

FIELD OF THE DISCLOSURE

Embodiments relate to database technology and more specifically, to adomain-specific language for dataset transformations.

BACKGROUND

The approaches described in this section are approaches that could bepursued, but not necessarily approaches that have been previouslyconceived or pursued. Therefore, unless otherwise indicated, it shouldnot be assumed that any of the approaches described in this sectionqualify as prior art merely by virtue of their inclusion in thissection.

A database management system (DBMS) supports generating and modifyingstored data. For example, a data definition language (DDL) or a datamanipulation language (DML) may be used to interact with a database.However, database interactions may be limited to the basic operationsavailable in the DDL or DML. Furthermore, complex operations writtenusing these basic operations may be error-prone and result in slowprocessing times.

A DBMS may manage multiple datasets, and data in different datasets areoften related by dependencies. Thus, a data change in one dataset mayrequire propagating the data change to another dataset. However,propagating data changes to datasets may involve re-computing an entiredataset. This may tie up computing resources, especially if the datachange is relatively small compared to unchanged data.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings:

FIG. 1 depicts an example computer architecture on which embodiments maybe implemented.

FIG. 2 depicts an example graphical representation of a table definitionthat includes dataset transformations.

FIG. 3 depicts a detailed view of a dataset transformation, in anexample embodiment.

FIG. 4 depicts an example optimization involving parallel computing.

FIGS. 5A-B depict example graphical representations of incrementalcomputation.

FIG. 6 is a flow diagram that depicts an approach for executing a tabledefinition.

FIG. 7 is a flow diagram that depicts an approach for performingincremental computation.

FIG. 8 depicts a computer system upon which an embodiment may beimplemented.

While each of the drawing figures depicts a particular embodiment forpurposes of depicting a clear example, other embodiments may omit, addto, reorder, and/or modify any of the elements shown in the drawingfigures. For purposes of depicting clear examples, one or more figuresmay be described with reference to one or more other figures, but usingthe particular arrangement depicted in the one or more other figures isnot required in other embodiments.

DETAILED DESCRIPTION

In the following description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of the present disclosure. It will be apparent, however,that the present disclosure may be practiced without these specificdetails. In other instances, well-known structures and devices are shownin block diagram form in order to avoid unnecessarily obscuring thepresent disclosure. Modifiers such as “first” and “second” may be usedto differentiate elements, but the modifiers do not necessarily indicateany particular order. For example, a second dataset may be so namedalthough, in reality, it may correspond to a first, second, and/or thirddataset.

General Overview

In an embodiment, a domain-specific language (DSL) may interface with anexisting DDL and/or DML to offer greater flexibility. For example, theDSL may facilitate generating and/or manipulating datasets stored involatile and/or non-volatile memory. Datasets may be manipulated basedon commands referred to herein as “dataset transformations”. Datasettransformations may be created and/or customized by an end user of theDSL. Each dataset transformation may generate an output dataset based onone or more input datasets.

Zero or more dataset transformations may be included in a tabledefinition. The table definition may generate an output table based onzero or more input tables. A sequence for the one or more datasettransformations may be determined based on a graphical representation ofthe one or more dataset transformations.

The DSL may support efficiently updating tables based on an incrementalcomputation without explicitly invoking the incremental computation. Theincremental computation may avoid re-computing a particular table toreflect an update to a dependent table. Instead, the incrementalcomputation may involve performing one or more dataset transformationson a portion of the dependent table that includes the update. Thetransformed portion may then be incorporated into an older version ofthe particular table to generate a new version of the particular tablethat reflects the update.

Example System Environment

FIG. 1 depicts an example computer architecture on which embodiments maybe implemented. Referring to FIG. 1, storage computer 100 iscommunicatively coupled to server computer 104, which is communicativelycoupled to client computer 108. Storage 100 includes source tables 102.Server computer 104 includes references 106 to source tables 102. Clientcomputer 108 includes client application 110.

Storage 100 may include one or more database servers, one or morestorage devices, and/or one or more of any other system for maintainingsource tables 102. For example, storage 100 may be a repository thatsupports maintaining multiple versions of each source table 102 in sucha manner that enables merging changes at any time that is convenient.

Tables (e.g., source tables 102, target tables) may include tabular datathat is persisted in storage 100 and/or server computer 104. Forexample, source tables 102 may be distributed database tables that arestored in a collective non-volatile memory of a cluster of databasecomputers. Tables may be stored in any format, such as JavaScript ObjectNotation (JSON), Extensible Markup Language (XML), comma-separatedvalues (CSV), a B-tree, and/or a binary encoding.

Server computer 104 may generate tables and/or datasets (e.g.,unpersisted data). Server computer 104 may materialize datasets andstore them in a volatile memory. Server computer 104 may causeparticular datasets to be stored as tables in a non-volatile memoryand/or storage 100.

Server computer 104 may include one or more web servers, one or morefile servers, and/or one or more of any other interface between storage100 and client computer 108. Server computer 104 may store copies oftables and/or references 106 to the tables.

References 106 may include pointers, memory addresses, symbolic links,and/or any other indirect reference to a table. Storing references 106to tables may reduce memory usage and enable data integration in O(1)time.

Storage 100 may be on a separate device from server computer 104.Alternatively, storage 100 may be a persistent storage on servercomputer 104. Storage 100 and server computer 104 may communicate usinga Representational State Transfer (REST) application programminginterface (API), a Simple Object Access Protocol (SOAP), and/or anyother set of constraints for exchanging information. Source tables 102in any of a number of different formats may be uploaded to storage 100and/or server computer 104 based on a plugin that causes source tables102 to be stored in a common format.

Client application 110 may be a browser, an integrated developmentenvironment (IDE), and/or any other user interface. Client application110 may enable composing a table definition in a DSL. As shall bedescribed in greater detail hereafter, the table definition may includea sequence of one or more dataset transformations to be performed on oneor more source tables 102 to generate a target table. The one or moredataset transformations may define the contents of the target table.

The DSL may be independent and different from a DDL and/or a DML usedwith source tables 102. In other words, server computer 104 maytranslate between a DSL used with client application 110 and a DDLand/or DML used with source tables 102.

A “computer” may be one or more physical computers, virtual computers,and/or computing devices. As an example, a computer may be one or moreserver computers, cloud-based computers, cloud-based cluster ofcomputers, virtual machine instances or virtual machine computingelements such as virtual processors, storage and memory, data centers,storage devices, desktop computers, laptop computers, mobile devices,and/or any other special-purpose computing devices. A computer may be aclient and/or a server. Any reference to “a computer” herein may meanone or more computers, unless expressly stated otherwise.

Example Table Definitions

FIG. 2 depicts an example graphical representation of a table definitionthat includes dataset transformations. Referring to FIG. 2, directedacyclic graph 200 includes leaf node 202 and non-leaf node 204. Leafnode 202 includes source tables 102A-B. Non-leaf node 204 includestransformations 206A-B and customized transformation 208. Target table210 is generated based on performing transformations 206A-B andcustomized transformation 208 on source tables 102A-B.

A directed acyclic graph 200 may be a graphical representation of atable definition for a target table 210. The table definition mayinclude one or more dataset transformations (e.g., transformations206A-B, customized transformation 208) to be performed on one or moresource tables 102. The one or more dataset transformations may berepresented as verbs, such as “aggregate”, “sort”, and “drop”, thatdescribe an operation that is to be performed in terms of the problemdomain instead of how to perform the operation as a sequence ofprogramming language primitives. In other words, table definitions maybe composed using declarative programming.

For example, table definition 1 generates target table 210 based onperforming transformation 206A on source table 102A.

Table definition 1: line 1: newTable(“target table 210”) { line 2:startWith “source table 102A” line 3: transformation 206A line 4: }

Line 3 of table definition 1 indicates that transformation 206A isperformed. However, in an embodiment, line 3 may indicate thatcustomized transformation 208 is performed. Dataset transformationsshall be described in greater detail hereafter.

In the example of FIG. 2, directed acyclic graph 200 may be a graphicalrepresentation of table definition 2. Table definition 2 generatestarget table 210 based on performing transformations 206A-B andcustomized transformation 208 on source tables 102A-B.

Table definition 2: line 1: newTable(“target table 210”) { line 2:startWith “source table 102A” line 3: transformation 206A line 4:transformation 206B [ “dataset” ] line 5: } line 6:privateTable(“dataset”) { line 7: startWith “source table 102B” line 8:customized transformation 208 line 9: }

Lines 6-9 of table definition 2 appear to be a separate table definitionbut may operate more like a dataset definition. Typically, “dataset” ismaterialized but remains unpersisted. In effect, lines 6-9 may beanalogous to a Structured Query Language (SQL) CREATE VIEW statement.The dataset resulting from lines 6-9 may be transparent only to tabledefinition 2.

Declarative programming may be used to express the logic of a tabledefinition without describing the control flow of the table definition.Thus, a sequence for the one or more dataset transformations may bedetermined based on the graphical representation. In the example of FIG.2, directed acyclic graph 200 indicates that both transformation 206Aand customized transformation 208 must be performed prior totransformation 206B. However, transformation 206A and customizedtransformation 208 may be performed at any time relative to each other.

The directed acyclic graph 200 may include zero or more leaf nodes 202and zero or more non-leaf nodes 204. The zero or more leaf nodes 202 mayrepresent zero or more tables. In the example of FIG. 2, each leaf node202 corresponds to a source table 102. In an embodiment, a target table210 may also be represented by a leaf node 202. Each non-leaf node 204may represent a dataset transformation.

Example Dataset Transformations

FIG. 3 depicts a detailed view of a dataset transformation, in anexample embodiment. Referring to FIG. 3, dataset transformation 302causes generating output dataset 304 based on an input of source dataset300. Dataset transformation 302 includes implementation 306.

A dataset (e.g., source dataset 300, output dataset 304) may be acollection of data that is stored in storage 100 and/or server computer104. Datasets may be stored in a volatile memory and/or persisted in anon-volatile memory. Datasets that are persisted may be called tables.

A dataset that is taken as an input of a dataset transformation 302 iscalled a source dataset 300, and a dataset that is generated as anoutput of a dataset transformation 302 is called an output dataset 304.In the example of FIG. 2, source table 102A is a source dataset 300 fortransformation 206A, and an output dataset 304 for transformation 206Ais a source dataset 300 for transformation 206B. Likewise, source table102B is a source dataset 300 for customized transformation 208, and anoutput dataset 304 for customized transformation 208 is a source dataset300 for transformation 206B. Thus, transformation 206B generates anoutput dataset 304 based on multiple source datasets 300. The outputdataset 304 for transformation 206B becomes target table 210 when it ispersisted.

A dataset transformation 302 may be any of a number of operations thatare performed on one or more datasets to generate yet another dataset.Each dataset transformation may be associated with an implementation 306that includes code for causing a particular operation to be performed.As mentioned above, dataset transformations 302 may describe what is tobe accomplished without describing how to accomplish it. Thus, animplementation 306 may describe how a dataset transformation 302 is tobe performed.

Referring to FIG. 3, dataset transformation 302 may be transformation206A, transformation 206B, or customized transformation 208 of FIG. 2.Thus, dataset transformation 302 may be an operation that is availablein a DSL by default (e.g., transformation 206A-B) or an operation thatis defined by an end user of the DSL (e.g., customized transformation208).

For example, in FIG. 2, source table 102A may represent the followingtable:

ID Major 1 Peace Studies 2 Software Engineering 3 Computer Engineering

Transformation 206A may be an operation that filters out non-engineeringmajors. An implementation 306 of transformation 206A may include afunction that compares each string value in a particular column with thestring values in an enumerated list and returns a Boolean value. Sourcetable 102A may be a source dataset 300 that is provided as input totransformation 206A to generate an output dataset 304 that representsthe following data:

ID Major 2 Software Engineering 3 Computer Engineering

Source table 102B may represent the following table:

ID GPA 1 2.0 2 1.7 3 0.9 4 1.5

Customized transformation 208 may be an operation that incrementsnumeric values by two. An implementation 306 of customizedtransformation 208 may include a function that adds two to each numericvalue in a particular column. Thus, source table 102B may be a sourcedataset 300 that is provided as input to customized transformation 208to generate an output dataset 304 that represents the following data:

ID GPA 1 4.0 2 3.7 3 2.9 4 3.5

Transformation 206B may be an operation that joins datasets into acomposite dataset based on matching values in a respective column ofeach dataset. An implementation 306 of transformation 206B may include afunction that performs an operation similar to a SQL INNER JOINoperation. For example, the output datasets 304 for transformation 206Aand customized transformation 208 may be provided as input totransformation 206B to generate an output dataset 304 that representsthe following data:

ID Major GPA 2 Software Engineering 3.7 3 Computer Engineering 2.9If this data is persisted, it may be called target table 210.

Example Parallel Computing Optimization

FIG. 4 depicts an example optimization involving parallel computing.Referring to FIG. 4, processes 400A-B perform transformation 206A andcustomized transformation 208 in parallel to generate target table 210based on source tables 102A-B.

Processes 400A-B may exist on a single computer or on multiplecomputers. For example, processes 400A-B may represent different threadson server computer 104 or two different server computers 104.

As mentioned above, a sequence of one or more dataset transformations302 may be determined based on a graphical representation of the one ormore dataset transformations 302. For example, the graphicalrepresentation depicted in FIG. 2 may indicate that transformation 206Aand customized transformation 208 may be performed concurrently in amulti-threaded application.

Example Incremental Computation Optimization

When a source table 102 is updated with a data change, the data changemay be incorporated into a table that depends on the source table 102.However, incorporating the data change may involve completely rebuildingthe table that depends on the source table 102. For example, at T1, aparticular table may be generated based on performing a particulardataset transformation 302 on a source table 102. At T2, the sourcetable 102 may be updated. Thus, at T3, the particular datasettransformation 302 may be performed on the updated source table 102 togenerate an updated version of the particular table.

Completely rebuilding a table may be computationally intensive,especially if updates are frequent. Furthermore, in some situations,completely rebuilding a table may inefficiently incorporate updates. Forexample, in the example datasets above for FIG. 2, source table 102A maybe updated to generate the following table:

ID Major 1 Peace Studies 2 Software Engineering 3 Computer Engineering 4Electrical EngineeringNote that the updated source table is generated based on appending thelast row to the previous version of source table 102A. In thissituation, instead of performing relevant dataset transformations 302 onthe updated source table in its entirety, it would be more efficient toperform the relevant dataset transformations 302 on an appended portion(e.g., the last row) of the updated source table. The transformedappended portion may then be combined with the table previouslygenerated based on the previous version of source table 102A. This iscalled incremental computation.

FIGS. 5A-B depict example graphical representations of incrementalcomputation. Referring to FIG. 5A, intermediate table 500 is generatedbased on performing transformations 206A-B and customized transformation208 on source tables 102A-B. Supplemental portion 504 is generated basedon performing transformations 206A-B and customized transformation 208on appended portion 502 and source table 102B. However, in an embodiment(e.g., FIG. 5B), supplemental portion 504 may be generated based onperforming one or more transformations 206 on source table 102A as wellas appended portion 502. Target table 508 is generated based onperforming transformation 506 on intermediate table 500 and supplementalportion 504. Note that incremental computation may be an optimizationthat is performed without an end user specifying transformation 506 andany of the operations used to generate supplemental portion 504.

Intermediate table 500 of FIG. 5A corresponds to target table 210 ofFIG. 2. Intermediate table 500 is generated and persisted prior togenerating supplemental portion 504. Thus, intermediate table 500 may beretrieved from storage 100 and/or server computer 104 prior togenerating target table 508.

In the example of FIG. 5A, appended portion 502 is a portion of anupdated source table that was appended to a previous version of sourcetable 102A. Although depicted in the example updated source table aboveas the last row, appended portion 502 may be data that is added at anyof a number of locations. For example, appended portion 502 may be a newfirst row, a new column, etc.

A supplemental portion 504 may be a portion of an intermediate table 500that reflects an update to a source table 102. The supplemental portion504 may be generated based on performing a set of one or more datasettransformations 302 on an appended portion 502 and/or one or more sourcetables 102. The set of one or more dataset transformations 302 may besimilar to that used to generate an intermediate table 500. In FIG. 5A,supplemental portion 504 may represent the following data:

ID Major GPA 4 Electrical Engineering 3.5Supplemental portion 504 may be a dataset and/or a table.

Transformation 506 may be an operation that combines one dataset withanother dataset to generate a composite dataset. In the example of FIG.5A, intermediate table 500 and supplemental portion 504 are provided asinput to transformation 506 to generate an output dataset 304 thatrepresents the following data:

ID Major GPA 2 Software Engineering 3.7 3 Computer Engineering 2.9 4Electrical Engineering 3.5If this data is persisted, it may be called target table 508.

Referring to FIG. 5B, transformation 206C may be similar to or differentfrom transformation 206A, and transformation 206D may be similar to ordifferent from transformation 206B. FIG. 5B differs from FIG. 5A in thatsupplemental portion 504 depends on source table 102A as well asappended portion 502. For example, in FIG. 5B, transformation 206A maybe an operation that takes the last two rows of source table 102A.However, appended portion 502 may consist of only one row. Thus,transformation 206C may take as input the last row of source table 102Ain addition to appended portion 502.

Approach for Determining Availability of Incremental Computation

Incremental computation may be an optimization that is available forderiving a target table 508 based on one or more criteria. The one ormore criteria may include one or more of the following:

-   -   an incremental status of a source table 102A    -   an incremental computability of a dataset transformation 302

Incremental Status of a Source Table

An incremental status of a source table 102A refers to a manner in whichan update is incorporated into the source table 102A. An incrementalstatus of “full” indicates that a target table 210 that depends on anupdated source table must be completely rebuilt, whereas an incrementalstatus of “incremental” indicates that incremental computation may beused to generate a target table 508 based on the updated source table.For example, a source table 102B without any updates may have anincremental status of “full”. Similarly, if an update replaces any datain a source table 102A, the source table 102A may have an incrementalstatus of “full”. In contrast, an update that adds data to a sourcetable 102A without replacing any data in the source table 102A may havean incremental status of “incremental”.

A target table 508 may be derived based on incremental computation ifthe target table 508 depends on at least one source table 102A with anincremental status of “incremental”. In other words, incrementalcomputation may be available if at least one source table 102Aincorporates an update by appending the update.

Incremental Computability of a Dataset Transformation

An incremental computability of a dataset transformation 302 may becategorized as one or more of the following:

-   -   a “concatenate” type    -   a “merge and append” type    -   a “merge and replace” type    -   an “impossible” type

A “concatenate” type corresponds to a dataset transformation 302 thatcan be computed efficiently by appending data to a previous result ofthe dataset transformation 302 without requiring access to the previousresult. For example, a “rename” transformation may correspond to a“concatenate” type, because the “rename” transformation can change thename of a column in an update without accessing a previous renaming ofthe column.

Like the “concatenate” type, a “merge and append” type corresponds to adataset transformation 302 that can be computed efficiently by appendingdata to a previous result of the dataset transformation 302. However,the “merge and append” type requires access to the previous result. Forexample, a “distinct” transformation may correspond to a “merge andappend” type, because the “distinct” transformation removes duplicaterows. Removing duplicate rows in an update cannot be performedconfidently without checking for duplicate rows between the update and,for example, the previous result of removing duplicate rows.

A “merge and replace” type corresponds to a dataset transformation 302that can be computed efficiently by replacing data in a previous resultof the dataset transformation 302. Like the “merge and append” type, the“merge and replace” type requires access to the previous result. Forexample, an “aggregate” transformation consisting of a “sum” operationmay correspond to a “merge and replace” type, because the “sum”operation calculates a subtotal for an update, which is then added to aprevious total to calculate a new total that replaces the previoustotal.

An “impossible” type corresponds to a dataset transformation 302 thatcannot take advantage of a previous result to perform incrementalcomputation. In other words, the “impossible” type may correspond to adataset transformation 302 that does not correspond to one of theaforementioned types. For example, an “aggregate” transformationincluding a “mostFrequentValue” operation may correspond to an“impossible” type, because the statistical mode of a previous resultdoes not necessarily inform the statistical mode of an updated set ofdata.

Like source tables 102, dataset transformations 302 may be associatedwith an incremental status. An incremental status of “full” correspondsto a “merge and replace” type of incremental computability. However, anincremental status of “incremental” corresponds to either a“concatenate” type or a “merge and append” type of incrementalcomputability.

A dataset transformation 302 may be associated with multiple types ofincremental computability based on one or more dependencies of thedataset transformation 302. The one or more dependencies may includesource tables 102 and/or other dataset transformations that provideinput to the dataset transformation 302. For example, a datasettransformation 302 with two dependencies may correspond to a“concatenate” type if the first dependency has an incremental status of“incremental”, a “merge and append” type if the second dependency has anincremental status of “incremental”, and an “impossible” type if eachdependency has an incremental status of “incremental”.

Furthermore, a dependency of a dataset transformation 302 may becharacterized as “reversible” if the dependency can be reconstructedfrom an output of the dataset transformation 302. In other words, areversible dependency may be a dependency that can be derived based onperforming an inverse dataset transformation on an output dataset 304.For example, a source dataset 300 of a dataset transformation 302 thatadds one to particular values is “reversible”, because an output dataset304 of the dataset transformation 302 can be subjected to an inverseoperation that subtracts one from the particular values to derive thesource dataset 300.

In an embodiment, incremental computation may be available if both ofthe following criteria are satisfied:

-   -   Each dataset transformation 302 with at least one dependency        that has an incremental status of “incremental” corresponds to a        “concatenate” type, a “merge and append” type, and/or a “merge        and replace” type of incremental computability.    -   Each dependency that is and/or depends on a dataset        transformation 302 corresponding to a “merge and append” type        and/or a “merge and replace” type of incremental computability        is a reversible dependency.

Example Incremental Computation Analysis

In the example of FIG. 5A, source table 102A has an incremental statusof “incremental”, and source table 102B has an incremental status of“full”. Since source table 102A is a dependency of transformation 206A,the incremental computability of transformation 206A must be assessed.Thus, in order for target table 508 to be generated based on incrementalcomputation, transformation 206A must correspond to a “concatenate”type, a “merge and append” type, and/or a “merge and replace” type ofincremental computability.

Transformation 206A may be an operation that filters out non-engineeringmajors. Since two portions of a dataset can be filtered independentlyand then combined to yield the same result as filtering the dataset inits entirety, transformation 206A corresponds to a “concatenate” type ofincremental computability. Furthermore, since a dataset transformation302 corresponding to a “concatenate” type is a dependency that has anincremental status of “incremental,” transformation 206A has anincremental status of “incremental”. Thus, in order for target table 508to be generated based on incremental computation, the incrementalcomputability of transformation 206B must also be assessed.

Transformation 206B may be analogous to a SQL INNER JOIN operation.Since performing transformation 206B on a dataset in its entirety yieldsthe same result as combining two portions of the dataset upon whichtransformation 206B has been performed separately, transformation 206Bcorresponds to a “concatenate” type of incremental computability.

Note that transformation 506 is irrelevant to determining whether targettable 508 can be generated based on incremental computation, becausetransformation 506 will become part of the implementation of incrementalcomputation once it is determined to be appropriate. In other words,only the dataset transformations 302 depicted in FIG. 2 are relevant tothe incremental computation analysis.

As a result of the foregoing incremental computation analysis, servercomputer 104 may determine that target table 508 can be generated usingincremental computation. Server computer 104 may be configured toperform incremental computation whenever server computer 104 determinesthat incremental computation is available.

Approach for Executing a Table Definition

FIG. 6 is a flow diagram that depicts an approach for executing a tabledefinition. At block 600, a server computer 104 may process a datasettransformation 302. The dataset transformation 302 may be included in atable definition that was received from a client computer 108. The tabledefinition may be composed in a DSL. The DSL may be specialized forexpressing dataset transformations 302 using declarative programming.

At block 602, the server computer 104 may obtain an implementation 306of the dataset transformation 302. The table definition may exclude theimplementation 306 to facilitate manipulating data. The implementation306 may be obtained from a separate file at the server computer 104.

At block 604, the server computer 104 may provide the implementation 306with one or more source datasets 300 as input. The one or more sourcedatasets 300 may be retrieved from a storage 100 and/or from the servercomputer 104. For example, the server computer 104 may rebuild a sourcedataset 300 that was previously retrieved from a storage 100 butsubsequently removed from a volatile memory due to a failure. Rebuildinglost datasets may be based on logs maintained by the server computer 104that record a lineage (e.g., a table definition, source datasets 300,dataset transformations 302) of a lost dataset.

At block 606, the server computer 104 may generate an output dataset 304based on executing the implementation 306. The output dataset 304 may bea transformed source dataset and/or a composite of multiple sourcedatasets 300. The output dataset 304 may be stored in volatile memory.

At block 608, the server computer 104 may determine whether the tabledefinition includes any subsequent dataset transformations 302. Asubsequent dataset transformation 302 may be determined based on agraphical representation of the table definition. If the tabledefinition includes any subsequent dataset transformations 302, theoutput dataset 304 may be used as a source dataset 300 for animmediately subsequent dataset transformation 302. Processing theimmediately subsequent dataset transformation 302 may involve a process(not shown) similar to repeating blocks 600-606. However, if the tabledefinition fails to include any subsequent dataset transformations 302,block 608 may proceed to block 610.

At block 610, the server computer 104 may generate a target table 210,508 based on persisting the output dataset 304. The target table 210,508 may be stored at server computer 104 and/or storage 100.

Approach for Performing Incremental Computation

FIG. 7 is a flow diagram that depicts an approach for performingincremental computation. At block 700, a server computer 104 mayidentify dataset transformations 302 with a dependency that has anincremental status of “incremental”. In other words, the server computer104 may determine whether one or more source tables 102 were updatedbased on appending (e.g., adding without replacing) data. Furthermore,the server computer 104 may identify any dataset transformations 302that depend directly or indirectly on the one or more source tables 102and determine whether any dataset transformations 302 have anincremental status of “incremental”. Thus, block 700 may be performedconcurrently with block 702.

At block 702, the server computer 104 may determine whether each datasettransformation 302 identified at block 700 corresponds to a“concatenate” type, a “merge and append” type, and/or a “merge andreplace” type of incremental computability. If each datasettransformation 302 is determined to correspond to an incrementalcomputability type other than an “impossible” type, block 702 proceedsto block 704. Otherwise, the incremental computation analysis ends andincremental computation is determined to be unavailable.

At block 704, the server computer 104 may identify any dependencies thatare or depend on a dataset transformation corresponding to a “merge andappend” type and/or a “merge and replace” type. Incremental computationmay still be available if such dependencies are reversible.

At block 705, the server computer 104 may determine whether eachdependency identified at block 704 is reversible. If any of theidentified dependencies is not reversible, the incremental computationanalysis ends and incremental computation is determined to beunavailable. Otherwise, block 705 proceeds to block 706.

At block 706, the server computer 104 may obtain an intermediate table500 generated based on performing one or more dataset transformations302 on a source table 102. Although depicted in FIG. 7 as beingperformed after block 700, block 706 may be performed prior to block700, after block 708, or at any other suitable time. For example, block706 of FIG. 7 may correspond to block 610 of FIG. 6.

At block 708, the server computer 104 may generate a supplementalportion 504 for the intermediate table 500 based on performing the oneor more dataset transformations 302 on at least an appended portion 502of the source table 102. In an embodiment, the one or more datasettransformations 302 may also be performed on the source table 102.

At block 710, the server computer 104 may generate a target table 210,508 based on combining the supplemental portion 504 with theintermediate table 500. Combining the supplemental portion 504 with theintermediate table 500 may involve performing a dataset transformation302 on the supplemental portion 504 and the intermediate table 500. Forexample, combining the supplemental portion 504 with the intermediatetable 500 may involve performing a square root operation to derivesubtotals for the supplemental portion 504 and the intermediate table500, adding the subtotals to derive a total, and squaring the total. Anoutput dataset 304 of the dataset transformation 302 may be persisted togenerate the target table 210, 508.

Hardware Overview

According to one embodiment, the techniques described herein areimplemented by one or more special-purpose computing devices. Thespecial-purpose computing devices may be hard-wired to perform thetechniques, or may include digital electronic devices such as one ormore application-specific integrated circuits (ASICs) or fieldprogrammable gate arrays (FPGAs) that are persistently programmed toperform the techniques, or may include one or more general purposehardware processors programmed to perform the techniques pursuant toprogram instructions in firmware, memory, other storage, or acombination. Such special-purpose computing devices may also combinecustom hard-wired logic, ASICs, or FPGAs with custom programming toaccomplish the techniques. The special-purpose computing devices may bedesktop computer systems, portable computer systems, handheld devices,networking devices or any other device that incorporates hard-wiredand/or program logic to implement the techniques.

For example, FIG. 8 is a block diagram that depicts a computer system800 upon which an embodiment may be implemented. Computer system 800includes a bus 802 or other communication mechanism for communicatinginformation, and a hardware processor 804 coupled with bus 802 forprocessing information. Hardware processor 804 may be, for example, ageneral purpose microprocessor.

Computer system 800 also includes a main memory 806, such as a randomaccess memory (RAM) or other dynamic storage device, coupled to bus 802for storing information and instructions to be executed by processor804. Main memory 806 also may be used for storing temporary variables orother intermediate information during execution of instructions to beexecuted by processor 804. Such instructions, when stored innon-transitory storage media accessible to processor 804, rendercomputer system 800 into a special-purpose machine that is customized toperform the operations specified in the instructions.

Computer system 800 further includes a read only memory (ROM) 808 orother static storage device coupled to bus 802 for storing staticinformation and instructions for processor 804. A storage device 810,such as a magnetic disk or optical disk, is provided and coupled to bus802 for storing information and instructions.

Computer system 800 may be coupled via bus 802 to a display 812, such asa cathode ray tube (CRT), for displaying information to a computer user.An input device 814, including alphanumeric and other keys, is coupledto bus 802 for communicating information and command selections toprocessor 804. Another type of user input device is cursor control 816,such as a mouse, a trackball, or cursor direction keys for communicatingdirection information and command selections to processor 804 and forcontrolling cursor movement on display 812. This input device typicallyhas two degrees of freedom in two axes, a first axis (e.g., x) and asecond axis (e.g., y), that allows the device to specify positions in aplane.

Computer system 800 may implement the techniques described herein usingcustomized hard-wired logic, one or more ASICs or FPGAs, firmware and/orprogram logic which in combination with the computer system causes orprograms computer system 800 to be a special-purpose machine. Accordingto one embodiment, the techniques herein are performed by computersystem 800 in response to processor 804 executing one or more sequencesof one or more instructions contained in main memory 806. Suchinstructions may be read into main memory 806 from another storagemedium, such as storage device 810. Execution of the sequences ofinstructions contained in main memory 806 causes processor 804 toperform the process steps described herein. In alternative embodiments,hard-wired circuitry may be used in place of or in combination withsoftware instructions.

The term “storage media” as used herein refers to any non-transitorymedia that store data and/or instructions that cause a machine tooperation in a specific fashion. Such storage media may comprisenon-volatile media and/or volatile media. Non-volatile media includes,for example, optical or magnetic disks, such as storage device 810.Volatile media includes dynamic memory, such as main memory 806. Commonforms of storage media include, for example, a floppy disk, a flexibledisk, hard disk, solid state drive, magnetic tape, or any other magneticdata storage medium, a CD-ROM, any other optical data storage medium,any physical medium with patterns of holes, a RAM, a PROM, and EPROM, aFLASH-EPROM, NVRAM, any other memory chip or cartridge.

Storage media is distinct from but may be used in conjunction withtransmission media. Transmission media participates in transferringinformation between storage media. For example, transmission mediaincludes coaxial cables, copper wire and fiber optics, including thewires that comprise bus 802. Transmission media can also take the formof acoustic or light waves, such as those generated during radio-waveand infra-red data communications.

Various forms of media may be involved in carrying one or more sequencesof one or more instructions to processor 804 for execution. For example,the instructions may initially be carried on a magnetic disk or solidstate drive of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 800 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 802. Bus 802 carries the data tomain memory 806, from which processor 804 retrieves and executes theinstructions. The instructions received by main memory 806 mayoptionally be stored on storage device 810 either before or afterexecution by processor 804.

Computer system 800 also includes a communication interface 818 coupledto bus 802. Communication interface 818 provides a two-way datacommunication coupling to a network link 820 that is connected to alocal network 822. For example, communication interface 818 may be anintegrated services digital network (ISDN) card, cable modem, satellitemodem, or a modem to provide a data communication connection to acorresponding type of telephone line. As another example, communicationinterface 818 may be a local area network (LAN) card to provide a datacommunication connection to a compatible LAN. Wireless links may also beimplemented. In any such implementation, communication interface 818sends and receives electrical, electromagnetic or optical signals thatcarry digital data streams representing various types of information.

Network link 820 typically provides data communication through one ormore networks to other data devices. For example, network link 820 mayprovide a connection through local network 822 to a host computer 824 orto data equipment operated by an Internet Service Provider (ISP) 826.ISP 826 in turn provides data communication services through the worldwide packet data communication network now commonly referred to as the“Internet” 828. Local network 822 and Internet 828 both use electrical,electromagnetic or optical signals that carry digital data streams. Thesignals through the various networks and the signals on network link 820and through communication interface 818, which carry the digital data toand from computer system 800, are example forms of transmission media.

Computer system 800 can send messages and receive data, includingprogram code, through the network(s), network link 820 and communicationinterface 818. In the Internet example, a server 830 might transmit arequested code for an application program through Internet 828, ISP 826,local network 822 and communication interface 818.

The received code may be executed by processor 804 as it is received,and/or stored in storage device 810, or other non-volatile storage forlater execution.

In the foregoing specification, embodiments have been described withreference to numerous specific details that may vary from implementationto implementation. The specification and drawings are, accordingly, tobe regarded in an illustrative rather than a restrictive sense. The soleand exclusive indicator of the scope of the disclosure, and what isintended by the applicants to be the scope of the disclosure, is theliteral and equivalent scope of the set of claims that issue from thisapplication, in the specific form in which such claims issue, includingany subsequent correction.

What is claimed is:
 1. A data processing method comprising: retrievingan intermediate table that was generated based in part on performing afirst transformation of one or more transformations on a version of aparticular source table, wherein the one or more transformations areperformable on one or more source tables to generate a target table;generating a supplemental portion for the intermediate table based inpart on performing a second transformation on an appended portion of anupdated version of the source table; generating the target table basedin part on performing a third transformation on the intermediate tableand the supplemental portion for the intermediate table, wherein themethod is performed by one or more computing devices.
 2. The method ofclaim 1, wherein the first transformation and the second transformationare each dataset transformations and are different datasettransformations.
 3. The method of claim 1, wherein the secondtransformation and the third transformation are performed without beingspecified by an end user.
 4. The method of claim 1, wherein generatingthe supplemental portion comprises performing a fourth transformation onan output dataset of the first transformation and an output dataset ofthe second transformation.
 5. The method of claim 4, wherein the fourthtransformation is reversible.
 6. The method of claim 1, wherein thetarget table is generated based on persisting an output dataset of thethird transformation.
 7. The method of claim 1, wherein a sequence ofone or more transformations is determined based on a graphicalrepresentation of the one or more transformations.
 8. The method ofclaim 7, wherein the graphical representation is a directed acyclicgraph.
 9. The method of claim 7, wherein the graphical representationcomprises one or more leaf nodes and one or more non-leaf nodes, the oneor more leaf nodes representing one or more tables, the one or morenon-leaf nodes representing the one or more transformations.
 10. Themethod of claim 1, wherein one or more references to the one or moresource tables are stored at a server computer, without copies of the oneor more source tables being stored at the server computer.
 11. Acomputer system comprising: one or more processors; one or morenon-transitory data storage media coupled to the one or more processorsand storing instructions which, when executed by the one or moreprocessors, cause: retrieving an intermediate table that was generatedbased on performing a first transformation of one or moretransformations on a version of a particular source table, wherein theone or more transformations are performable on one or more source tablesto generate a target table; generating a supplemental portion for theintermediate table based in part on performing a second transformationon an appended portion of an updated version of the source table;generating the target table based in part on performing a thirdtransformation on the intermediate table and the supplemental portionfor the intermediate table.
 12. The system of claim 11, wherein thefirst transformation and the second transformation are each datasettransformations and are different dataset transformations.
 13. Thesystem of claim 11, wherein the one or more storage media furthercomprise sequences of instructions which when executed cause performingthe second transformation and the third transformation without beingspecified by an end user.
 14. The system of claim 11, wherein the one ormore storage media further comprise sequences of instructions which whenexecuted cause performing generating the supplemental portion byperforming a fourth transformation on an output dataset of the firsttransformation and an output dataset of the second transformation. 15.The system of claim 14, wherein the fourth transformation is reversible.16. The system of claim 11, wherein the one or more storage mediafurther comprise sequences of instructions which when executed causegenerating the target table based on persisting an output dataset of thethird transformation.
 17. The system of claim 11, wherein the one ormore storage media further comprise sequences of instructions which whenexecuted cause determining a sequence of one or more transformationsbased on a graphical representation of the one or more transformations.18. The system of claim 17, wherein the graphical representation is adirected acyclic graph.
 19. The system of claim 17, wherein thegraphical representation comprises one or more leaf nodes and one ormore non-leaf nodes, the one or more leaf nodes representing one or moretables, the one or more non-leaf nodes representing the one or moretransformations.
 20. The system of claim 11, wherein the one or morestorage media further comprise sequences of instructions which whenexecuted cause storing one or more references to the one or more sourcetables at a server computer, without corresponding copies of the one ormore source tables being stored at the server computer.